let str = 'hello\nworld';
let regexp1 = /llo$/m;
console.log(regexp1.test(str));//false

let str2 = 'hello world';
let regexp2 = /^world/;//脱字符
console.log(regexp2.test(str2));

let str3 = 'hello world';
let regexp3 = /world$/;//脱字符
console.log(regexp3.test(str3));